#ifndef XmlLoader_h__
#define XmlLoader_h__

#include <map>
class XMLNode;
enum XMLSteps
{ START, BEGINELEM, NAME, VALUE, TEXT, ENDELEM};

class XMLLoader
{
public:
	XMLLoader();
	XMLLoader(const tstring& file);
	virtual ~XMLLoader();

	void Load(const tstring& file);
	const tstring& GetStartElement() const;
	const tstring& GetValue(const tstring& key) const;
	const tstring& GetText() const;
	const XMLNode* GetParent() const;
	bool Next();

private:
	bool m_Loaded;
	vector<XMLNode*> m_Nodes;
	XMLNode* m_TempNode;
	XMLNode* m_CurrentNode;

	XMLLoader(const XMLLoader &t);
	XMLLoader& operator= (const XMLLoader &t);
};
#endif // XmlLoader_h__